home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / dateformat.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  796 b   |  37 lines

  1. <!--- This example shows the various types of output
  2. possible with dateFormat --->
  3.  
  4. <HTML>
  5.  
  6. <HEAD>
  7. <TITLE>
  8. DateFormat Example
  9. </TITLE>
  10. </HEAD>
  11.  
  12. <CFSET todayDate = #Now()#>
  13. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  14. <BODY  bgcolor="#FFFFD5">
  15.  
  16. <H3>DateFormat Example</H3>
  17.  
  18. <P>Today's date is <CFOUTPUT>#todayDate#</CFOUTPUT>.
  19.  
  20. <P>Using dateformat, we can display that date in a number of 
  21. different ways:
  22. <CFOUTPUT>
  23. <UL>
  24.     <LI>#DateFormat(todayDate)#
  25.     <LI>#DateFormat(todayDate, "mmm-dd-yyyy")#
  26.     <LI>#DateFormat(todayDate, "mmmm d, yyyy")#
  27.     <LI>#DateFormat(todayDate, "mm/dd/yyyy")#
  28.     <LI>#DateFormat(todayDate, "d-mmm-yyyy")#    
  29.     <LI>#DateFormat(todayDate, "ddd, mmmm dd, yyyy")#    
  30.     <LI>#DateFormat(todayDate, "d/m/yy")#
  31. </UL>    
  32.     
  33. </CFOUTPUT>    
  34. </BODY>
  35.  
  36. </HTML>       
  37.